<!--
  - Copyright (c) 2023.
  -
  - 作者：bmy
  - 邮箱：2271608011@qq.com
  - gitee：https://gitee.com/bmycode
  - github：https://github.com/helpcode
  -
  -->

<script lang="ts">
  import { themeConfig } from '@/stores/ThemeStore';
  import { onMount } from "svelte";
  import Router from "svelte-spa-router";
  import { SvelteUIProvider } from '@svelteuidev/core';
  import routes from "./router";
  import ChangeTheme from "@/utils/ChangeTheme";

  onMount(async () => {
    await ChangeTheme.setThemeRunCode($themeConfig,'app')
  });

</script>

<div class="app">
  <SvelteUIProvider themeObserver={$themeConfig.theme}>
    <Router {routes} />
  </SvelteUIProvider>
</div>

<style lang="less">

</style>
